package com.virtualmall.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.virtualmall.bean.Order;
import com.virtualmall.common.Page;
import com.virtualmall.service.BaseService;
import com.virtualmall.service.OrderService;

@Service
@Transactional
public class OrderServiceImpl extends BaseService implements OrderService {

	public void create(Order order) {
		this.orderDao.create(order);
	}

	public void delete(Order order) {
		this.orderDao.delete(order);
	}

	public List<Order> getOrderList(Long userId,String orderType,Page page) {
		return this.orderDao.getOrderList(userId,orderType,page);
	}

	public Long getOrderListCount(Long userId) {
		return this.orderDao.getOrderListCount(userId);
	}

    public void update(Order order) {
        this.orderDao.update(order);
    }

	@Override
	public List<Order> read(Order order) {
		return this.orderDao.read(order);
	}

    @Override
    public Order read(Long id) {
        return this.orderDao.read(id);
    }
}
